package com.code.service.impl;

import com.code.domain.Address;
import com.code.mapper.AddressMapper;
import com.code.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    AddressMapper addressMapper;
    @Override
    public Address search(Integer addressId) {
        return addressMapper.search(addressId);
    }

    @Override
    public int addAddress(String AddressName) {
        return addressMapper.addAddress(AddressName);
    }

    @Override
    public int deleteAddress(Integer addressId) {
        return addressMapper.deleteAddress(addressId);
    }

    @Override
    public int updateAddress(Address address) {
        return addressMapper.updateAddress(address);
    }

    @Override
    public List<Address> searchAll() {
        return addressMapper.searchAll();
    }
}
